#pragma once

typedef bool (*pfnmessage)( _uint32 client, _lpcstr data, size_t size );

struct message
{
	USHORT		msgtype;
	pfnmessage	pfn;
};

void ProcessData( _uint32 client, _lpcstr data, size_t size );

bool RequestAlgorithm( _uint32 client, _lpcstr data, size_t size );
bool RequestData( _uint32 client, _lpcstr data, size_t size );
bool ClientResult( _uint32 client, _lpcstr data, size_t size );
bool ClientProgress( _uint32 client, _lpcstr data, size_t size );
bool ClientError( _uint32 client, _lpcstr data, size_t size );
bool ClientAccept( _uint32 client, _lpcstr data, size_t size );
bool ClientQuit( _uint32 client, _lpcstr data, size_t size );